## Figure 4

coef.vec <- c(-0.01, 1.60,.50,-.39,.3)
se.vec <- c(0.04,0.06,.03,.01,.01)
coef.vec2 <- c(0.50,.28,-.15,.08,.6)
se.vec2 <- c(.40,.08,.04,.04,.04)
var.names <- c("WWI","WWII", "Korea", "Vietnam", "Afghanistan")

y.axis <- c(length(coef.vec):1)
windows(width=9.5,height=5)

par(mar=c(4, 5, 2, 1),mfrow=c(1,2),mgp=c(2,0.5,0), tck=-.03)


plot(coef.vec, y.axis, type = "p", axes = F, xlab = "Shift in Mean Ideal Point Estimates", cex.lab=0.8,ylab = "", pch = 19, cex = .6, xlim = c(-.5,2), ylim=c(0.5,5),xaxs = "r", main = "") 
segments(coef.vec-qnorm(.95)*se.vec, y.axis, coef.vec+qnorm(.95)*se.vec, y.axis, lwd =  1)
points(coef.vec2,y.axis-0.1,type="p",pch=19,cex=0.6)
segments(coef.vec2-qnorm(.95)*se.vec2, y.axis-0.1, coef.vec2+qnorm(.95)*se.vec2, y.axis-0.1, lwd =  1, lty=2)


axis(1, at = seq(-.5,2,by=.5), labels = NA, tick = T,cex.axis = .8, mgp = c(2,.7,0))
axis(1, at = seq(-.5,2,by=.5), labels =  c(-0.50,  0, 0.50,1,1.50,2), tick = T,cex.axis = .8, mgp = c(2,.7,0))
axis(2, at = y.axis, label = var.names, las = 1, tick = F, ,mgp = c(2,.6,0),
    cex.axis = .8) 
segments(0,0,0,10,lty=3) 
box()
text(1.1, 2.5, expression("Toward President"), adj = 0, cex = .75)

legend(1.15, 1.5, c("House","Senate"), cex=0.6, lwd=1.5,lty=1:2)
segments(1.05, 2.3, 1.05,2.7,lwd=2)
segments(1.05, 2.3, 1.875,2.3,lwd=2)
segments(1.05, 2.7, 1.875,2.7,lwd=2)
segments(1.875, 2.3, 1.875,2.7,lwd=2) 
title(main="Entering War",cex=0.9)



coef.vec <- c(-0.03,-.06,-.35,-.08)
se.vec <- c(0.04,.02,.02,.01)
coef.vec2 <- c(-0.12,-.07,-.33,-.19)
se.vec2 <- c(.08,.05,.04,.03)
var.names <- c("WWI","WWII", "Korea", "Vietnam")

y.axis <- c(length(coef.vec):1)

plot(coef.vec, y.axis, type = "p", axes = F, xlab = "Shift in Mean Ideal Point Estimates", cex.lab=0.8,ylab = "", pch = 19, cex = .6,xlim = c(-.5,.5), ylim=c(0.5,4),xaxs = "r", main = "") 
segments(coef.vec-qnorm(.95)*se.vec, y.axis, coef.vec+qnorm(.95)*se.vec, y.axis, lwd =  1)
points(coef.vec2,y.axis-0.1,type="p",pch=19,cex=0.6)
segments(coef.vec2-qnorm(.95)*se.vec2, y.axis-0.1, coef.vec2+qnorm(.95)*se.vec2, y.axis-0.1, lwd =  1, lty=2)



axis(1, at = seq(-.5,.5,by=.25), labels = NA, tick = T,
    cex.axis = .8, mgp = c(2,.7,0))
axis(1, at = seq(-.5,.5,by=.25), labels =  c(-0.50, -.25, 0, .25,0.50), tick = T,
    cex.axis = .8, mgp = c(2,.7,0))
axis(2, at = y.axis, label = var.names, las = 1, tick = F, ,mgp = c(2,.6,0),
    cex.axis = .8) 
segments(0,0,0,10,lty=3) 
box()
text(.12, 2, expression("Toward President"), adj = 0, cex = .75)
title(main="Exiting War",cex=0.9)

legend(.15, 1.25, c("House","Senate"), cex=0.6, lwd=1.5,lty=1:2)
segments(.1, 1.85, .1,2.15,lwd=2)
segments(.435, 1.85, .435,2.15,lwd=2)
segments(.1, 1.85, .435,1.85,lwd=2)
segments(.1, 2.15, .435,2.15,lwd=2) 